/* Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Colors */
    --color-grey-50: #fffdf5;
    --color-grey-100: #eae8e1;
    --color-grey-900: #979490;
    --color-grey-1000: #2f2c2b;

    /* Fonts */
    --font-sans-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif-primary: 'Playfair Display', Georgia, Cambria, "Times New Roman", Times, serif;

    /* Spacing */
    --spacing: 0.25rem;

    /* Transitions */
    --transition-default: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-sans-primary);
    line-height: 1.5;
    color: var(--color-grey-1000);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.projects-container {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    padding-left: 80px;
    padding-right: 80px;
}

/* Grid System */
.w-full {
    width: 100%;
}

.grid {
    display: grid;
}

.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.col-span-12 {
    grid-column: span 12 / span 12;
}

.col-span-10 {
    grid-column: span 10 / span 10;
}

.col-start-4 {
    grid-column-start: 4;
}

.col-start-9 {
    grid-column-start: 9;
}

/* Positioning */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.bottom-0 {
    bottom: 0;
}

/* Z-index */
.z-0 {
    z-index: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-30 {
    z-index: 30;
}

/* Spacing */
.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.m-0 {
    margin: 0;
}

.mt-3 {
    margin-top: 0.75rem;
}

.gap-y-20 {
    row-gap: 5rem;
}

/* Layout */
.min-h-screen-fix {
    min-height: 100vh;
}

.h-full {
    height: 100%;
}

.h-svh {
    height: 100vh;
    height: 100svh;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

/* Typography */
.text-balance {
    text-wrap: balance;
}

.text-7xl {
    font-size: 4.5rem;
    line-height: 1;
}

.text-2xl {
    font-size: 1.375rem;
    line-height: 1.5;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 1.2;
}

.text-md {
    font-size: 1.063rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75;
}

.font-serif-primary {
    font-family: var(--font-serif-primary);
}

.font-sans-primary {
    font-family: var(--font-sans-primary);
}

.font-normal {
    font-weight: 400;
}

.font-light {
    font-weight: 300;
}

.leading-none {
    line-height: 1.1;
}

.leading-tight {
    line-height: 1.25;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.text-grey-1000 {
    color: var(--color-grey-1000);
}

.text-grey-900 {
    color: var(--color-grey-900);
}

/* Images and Media */
.aspect-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-1-1 {
    aspect-ratio: 1 / 1;
}

.rounded-2xl {
    border-radius: 1rem;
}

.overflow-hidden {
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

.transform-gpu {
    transform: translateZ(0);
    will-change: transform;
}

/* Transitions */
.transition {
    transition: var(--transition-default);
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

.transform {
    transform: translateZ(0);
}

/* Hover Effects */
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-0.25rem);
}

.group:hover .group-hover\:-translate-y-2 {
    transform: translateY(-0.5rem);
}

/* Pointer Fine (Desktop) Hover Effects */
@media (pointer: fine) {
    .pointer-fine\:hover\:-translate-y-2:hover {
        transform: translateY(-0.5rem);
    }

    .pointer-fine\:hover\:-translate-y-1:hover {
        transform: translateY(-0.25rem);
    }

    .pointer-fine\:block {
        display: block;
    }

    .pointer-fine\:opacity-0 {
        opacity: 0;
    }

    .pointer-fine\:group-hover\:opacity-100.group:hover {
        opacity: 1;
    }
}

/* Hidden by default */
.hidden {
    display: none;
}

/* Block */
.block {
    display: block;
}

/* Inline Flex */
.inline-flex {
    display: inline-flex;
}

/* Flex Shrink */
.flex-shrink-0 {
    flex-shrink: 0;
}

/* Button Styles */
button {
    border: none;
    background: none;
    cursor: pointer;
}

.border {
    border-width: 1px;
    border-style: solid;
}

.rounded-md {
    border-radius: 0.375rem;
}

.bg-grey-50 {
    background-color: var(--color-grey-50);
}

.border-grey-50 {
    border-color: var(--color-grey-50);
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.mr-0\.5 {
    margin-right: 0.125rem;
}

.align-middle {
    vertical-align: middle;
}

/* Focus Styles */
.focus\:outline-none:focus {
    outline: none;
}

/* Opacity */
.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

/* Picture and Image */
picture {
    display: block;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Video */
video {
    display: block;
}

/* SVG Icons */
svg {
    display: inline-block;
    vertical-align: middle;
}

button svg {
    width: 1em;
    height: 1em;
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
}

/* Responsive Breakpoints */
@media (min-width: 768px) {
    .md\:text-clamp-xl {
        font-size: clamp(3rem, 21vw, 18.75rem);
    }

    .md\:aspect-1-1 {
        aspect-ratio: 1 / 1;
    }

    .md\:mt-4 {
        margin-top: 1rem;
    }

    .md\:z-20 {
        z-index: 20;
    }
}

/* Ensure proper aspect ratio support */
@supports not (aspect-ratio: 1 / 1) {
    .aspect-4-3::before {
        content: '';
        display: block;
        padding-top: 75%;
    }

    .aspect-1-1::before {
        content: '';
        display: block;
        padding-top: 100%;
    }

    .aspect-4-3>*,
    .aspect-1-1>* {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

@media (min-width: 1024px) {
    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }

    .lg\:col-span-4 {
        grid-column: span 4 / span 4;
    }

    .lg\:col-span-5 {
        grid-column: span 5 / span 5;
    }

    .lg\:col-start-1 {
        grid-column-start: 1;
    }

    .lg\:col-start-2 {
        grid-column-start: 2;
    }

    .lg\:col-start-8 {
        grid-column-start: 8;
    }

    .lg\:col-start-9 {
        grid-column-start: 9;
    }

    .lg\:mt-20 {
        margin-top: 5rem;
    }

    .lg\:mb-60 {
        margin-bottom: 15rem;
    }

    .lg\:-mt-20 {
        margin-top: -5rem;
    }

    .lg\:-mt-44 {
        margin-top: -11rem;
    }

    .lg\:mt-32 {
        margin-top: 8rem;
    }

    .lg\:text-lg {
        font-size: 1.125rem;
        line-height: 1.75;
    }

    .lg\:w-14 {
        width: 3.5rem;
    }

    .lg\:h-14 {
        height: 3.5rem;
    }

    .lg\:text-2xl {
        font-size: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .xl\:text-3xl {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    .xl\:text-2xl {
        font-size: 1.375rem;
        line-height: 1.5;
    }

    .xl\:mt-6 {
        margin-top: 1.5rem;
    }
}

/* Special Utilities */
.-my-4 {
    margin-top: -1rem;
    margin-bottom: -1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Animation Classes for JS */
.js-heading {
    opacity: 0.15;
    overflow: visible;
}

.js-item-344 {
    opacity: 1;
}

/* Ensure videos are properly positioned */
video {
    width: 100%;
    height: 100%;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Padding */
@media (max-width: 1024px) {
    .projects-container {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 768px) {
    .projects-container {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* Mobile Grid - Stack vertically */
    .grid-cols-12 {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    /* Hide sticky heading on mobile */
    .col-span-12.w-full.top-0.left-0.z-0.pointer-events-none.absolute.h-full {
        display: none !important;
    }

    /* Mobile section title */
    .projects-container::before {
        content: 'Our Projects';
        display: block;
        font-family: 'Playfair Display', serif;
        font-size: clamp(32px, 10vw, 48px);
        font-weight: 700;
        color: var(--color-grey-1000);
        text-align: center;
        margin-bottom: 40px;
        letter-spacing: -1px;
    }

    /* Reset all column spans and positions */
    [class*="col-span"],
    [class*="col-start"] {
        grid-column: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Mobile project cards */
    .js-item-344 {
        width: 100% !important;
        margin: 0 !important;
        transform: none !important;
        opacity: 1 !important;
    }

    /* Enhanced card styling */
    .js-item-344 a {
        display: block;
        background: #ffffff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .js-item-344 a:active {
        transform: scale(0.98);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    /* Image container */
    .js-item-344 .rounded-2xl {
        border-radius: 0 !important;
        aspect-ratio: 16/9 !important;
        position: relative;
        overflow: hidden;
    }

    /* Add gradient overlay */
    .js-item-344 .rounded-2xl::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40%;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
        opacity: 0.7;
        z-index: 1;
        pointer-events: none;
    }

    /* Image and video styling */
    .js-item-344 img,
    .js-item-344 video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    /* Text content */
    .js-item-344 .transition.transform {
        padding: 20px 18px !important;
        margin-top: 0 !important;
        background: #ffffff;
    }

    /* Project title */
    .js-item-344 h3 {
        font-size: 22px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
        color: var(--color-grey-1000) !important;
        letter-spacing: -0.3px;
    }

    /* Project description */
    .js-item-344 p {
        font-size: 15px !important;
        line-height: 1.5 !important;
        color: var(--color-grey-900) !important;
        font-weight: 300 !important;
    }

    /* Hide arrow button on mobile */
    .js-item-344 button,
    .js-item-344 .absolute.bottom-0.right-0 {
        display: none !important;
    }

    /* Typography adjustments */
    .text-7xl {
        font-size: 2.5rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .text-2xl {
        font-size: 1.25rem;
    }

    /* Spacing adjustments */
    .gap-y-20 {
        row-gap: 2rem;
    }

    .mt-3 {
        margin-top: 0.5rem;
    }

    /* Remove negative margins on mobile */
    [class*="lg:-mt"],
    [class*="lg:mt"],
    [class*="lg:mb"] {
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .projects-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .projects-container::before {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .grid-cols-12 {
        gap: 25px;
    }

    .js-item-344 h3 {
        font-size: 20px !important;
    }

    .js-item-344 p {
        font-size: 14px !important;
    }

    .js-item-344 .transition.transform {
        padding: 18px 16px !important;
    }
}